Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor function to device mapping class #45

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

kingsleyadam
Copy link
Owner

This code refactors how the device class is mapped to Free@Home function. And it adds in the ability to limit which classes you want to load. I added the limiter more for testing purposes. It reduces the noise on the websocket if we only focus on a single class. But this could be use in the future (maybe in Home Assistant, give the ability to select which class devices to setup?

I also saw a channel named in my setup, add in a catch to fall-back to device name if this comes through.

_function_to_device_mapping could probably sit in a constants file, if this grows too big it can always be moved.

@kingsleyadam kingsleyadam added the enhancement New feature or request label Oct 16, 2024
@kingsleyadam kingsleyadam enabled auto-merge (squash) October 16, 2024 11:14
@kingsleyadam kingsleyadam merged commit 8d431cb into main Oct 16, 2024
7 checks passed
@kingsleyadam kingsleyadam deleted the u/kingsleyadam/refactorDeviceMapping branch October 16, 2024 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant